package edu.tongji.engine.plugin.webservice;

import java.net.URL;
import org.codehaus.xfire.client.Client;

   public class HelloWebservice {
       public static void main(String[] args) throws Exception
       {
//        Client client = new Client(new URL("http://localhost:8080/WSTest/services/calculate?WSDL"));
//        Object[] results = client.invoke("add", new Object[] {1,2});
        WebServiceUtil util = new WebServiceUtil();
        Object[] results =
        	util.invokeWebService("http://localhost:8080/WSTest/services/calculate?WSDL","add", new Object[] {1,2});
        System.out.println(results[0]);
       }
   }
